1. Field of the Disclosure
Exemplary embodiments of the present disclosure generally relate to a method for automatically setting ID in UART ring communication, and more particularly to a method for automatically setting ID in UART ring communication configured to allow an intrinsic ID (Identification) setting of communication devices mutually transmitting/receiving data by being connected to a network to be automatically on the network.
2. Discussion of the Related Art
Communication is a series of systems that exchanges required data among devices, and UART (Universal Asynchronous Receiver/Transmitter) is a micro chip that contains a program configured to control an interface toward serial devices attached to a computer, and can communicate with a modem or other serial devices or exchange data. A UART communication using the UART is a universal communication embedded in a general CPU and generally used for communication among devices. A device configured to control communication flow in a communication network is called a master and a device configured to perform an operation corresponding thereto in response to a signal of the master is called a slave, and an intrinsic ID must be available at each device for the communication.
In general, an intrinsic ID is set up by a user, and when a user erroneously sets up an intrinsic ID, collision occurs among devices when devices each having an identical ID are available on a same network, whereby no communication may be generated.
A ring topology in a communication topology is a type of communication network in which devices form a ring-type network to allow data transmission to be realized in adjacent devices.
FIG. 1 is a schematic view illustrating a data flow in a conventional ring-type network, where a master (10) and a plurality of slaves (11, 12, 13) are connected to adjacent devices through one communication line (L1, L2, L3, L4), and when the master (10) requests data from a slave configured to receive a data, the requested slave outputs the data to the communication line and the data is finally transmitted to the master (10) through the adjacent slaves.
For example, when the master (10) outputs a data request signal to request a data of No. 2 slave (12), the data request signal is transmitted to the No. 2 slave (12) through the communication lines (L1, L2) and when the No. slave (12) outputs a data signal, the outputted data signal is transmitted to the master (10) through the communication lines (L3, L4). At this time, when two or more slaves in the plurality of slaves (11, 12, 13) are set to have an identical ID, the two or more slaves having the same ID output all data to the communication lines, there may occur collisions on the communication lines to disable a smooth communication.
The disablement of smooth communication due to data collision on the communication lines is because slaves have the same ID, and the ID setting error is largely generated by erroneous setting by a user in the course of directly setting the ID.